from concurrent.futures import ThreadPoolExecutor
from missav.test_redis import RedisConn
r = RedisConn()
def down_video(url_t):
   for i in range(3):
       try:
           from missav.get_m3u8_3 import down
           print("movie_url", url_t)
           down(url_t)
       except Exception as e:
           print("down video \t", e)
           continue
       else:
           print("下载完成 down_video")
           break
if __name__ == '__main__':

    # with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
    #     executor.map(down_video, url_list_movie)
    import psutil
    # 下载单个电影
    # 来福大酒店
    # down_video("https://www.fofoyy.com/dianying/102110")
    # 抓娃娃
    # down_video("https://www.fofoyy.com/dianying/103173")
    # # 走走停停
    # down_video("https://www.fofoyy.com/dianying/102103")
    # # # 星球崛起
    # down_video("https://www.fofoyy.com/dianying/103032")
    # # 犯罪都市4
    # down_video("https://www.fofoyy.com/dianying/102860")
    # # 彩虹线
    # down_video("https://www.fofoyy.com/dianying/102875")
    # 守龙者
    # down_video("https://www.fofoyy.com/dianying/103538")
    # 醉后一拳
    # down_video("https://www.fofoyy.com/dianying/103501")


    #     电视剧
    #     梦想城
    # https://www.fofoyy.com/dianshiju/103051
    # down_video("https://www.fofoyy.com/dianshiju/103051")
    # down_video("https://www.fofoyy.com/dianshiju/94283")
    # 大唐
    # down_video("https://www.fofoyy.com/dianshiju/103247")
    # down_video("https://www.fofoyy.com/dianshiju/102648")
    # down_video("https://www.fofoyy.com/dianshiju/102183")
    # down_video("https://www.fofoyy.com/dianying/101414")
    # s1 = "https://www.fofoyy.com/dianying/103654"
    # down_video("https://www.fofoyy.com/dianying/103654")
    #  小夫妻
    # down_video("https://www.fofoyy.com/dianshiju/103466")
    # 唐人街探案
    # down_video("https://www.fofoyy.com/dianshiju/100524")
    # 寻龙迷棺
    # down_video("https://www.fofoyy.com/dianying/103296")
    # down_video("https://www.fofoyy.com/dianying/103327")
    # down_video("https://www.fofoyy.com/dianying/103103")
    # down_video("https://www.fofoyy.com/dianshiju/104052")
    # down_video("https://www.fofoyy.com/dianying/104204")
    # down_video("https://www.fofoyy.com/dianying/39482")
    # down_video("https://www.fofoyy.com/dianying/50214")
    # down_video("https://www.fofoyy.com/dianying/49959")
    # down_video("https://www.fofoyy.com/dianying/21014")






